package com.xujl.mvcbind.ui.element;

import android.view.ViewStub;

import com.xujl.elementlib.main.BaseElement;
import com.xujl.mvcbind.R;
import com.xujl.mvcbind.databinding.ElementFormBinding;

import androidx.databinding.ObservableField;

/**
 * @author x
 * @Description
 */
public class FormElement extends BaseElement<ElementFormBinding> {
    public ObservableField<String> name = new ObservableField<>();
    public ObservableField<String> sex = new ObservableField<>();
    public ObservableField<String> age = new ObservableField<>();

    public FormElement (ViewStub viewStub) {
        super(viewStub);
    }

    @Override
    protected int getLayoutId () {
        return R.layout.element_form;
    }

    @Override
    public void initView () {
        super.initView();

    }

    public String getInputData () {
        return "name:" + name.get() + "\nsex:" + sex.get() + "\nage:" + age.get();
    }
}
